 import React,{ Component } from 'react'
 import {HomeIndexStyle,HomeTitle} from './HomeIndexStyle'
 import { NavLink,Route,Redirect,Switch } from 'react-router-dom'
//  import HomeNow from './homenow/HomeNow';
import Now from './homenow/now';
import Future from './homenow/Future'


 class HomeIndex extends Component{

    render ( ) {
        return (
            <HomeIndexStyle>
            <HomeTitle>
              <NavLink activeclass="active" to='/home/index/now'> 今日10点上新 </NavLink>
              <NavLink activeclass="active" to='/home/index/future'> 明日10点预告 </NavLink>
            </HomeTitle>
            {/* 三级路由 */}
            <Switch>
              <Redirect from='/home/index' to='/home/index/now' exact/>  
              <Route path="/home/index/now" component={ Now }/>
              <Route path="/home/index/future" component={ Future }/>
            </Switch>  
            </HomeIndexStyle>
        )
    }
 }

 export default HomeIndex